package com.dzl.order;

import com.dzl.base.controller.BaseController;
import com.dzl.order.pojo.vo.WelfareOrderGoodsPayDetailVo;
import com.dzl.order.service.WelfareOrderGoodsService;
import com.dzl.util.JsonResult;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * 订单商品表(WelfareOrderGoods)表控制层
 * @author ChenLong
 * @date 2021-06-11 20:41:18
 */
@RestController
@RequestMapping("/welfareOrderGoods")
public class WelfareOrderGoodsController extends BaseController {

    @Autowired
    private WelfareOrderGoodsService service;

    /**
     * 获取支付信息
     * @author ChenLong
     * @date 2021-09-10 10:34:57
     * @param orderId 订单ID
     * @return com.dzl.util.JsonResult<com.dzl.order.pojo.vo.WelfareOrderGoodsPayDetailVo>
     **/
    @GetMapping("/getPaymentInfo")
    public JsonResult<WelfareOrderGoodsPayDetailVo> getPaymentInfo(Integer orderId) {
        return JsonResult.success(service.getPaymentInfo(orderId,1));
    }

    /**
     * 获取支付信息
     * @author ChenLong
     * @date 2021-09-10 10:35:16
     * @param orderId 订单Id
     * @return com.dzl.util.JsonResult<com.dzl.order.pojo.vo.WelfareOrderGoodsPayDetailVo>
     **/
    @GetMapping("/getPaymentInfoForIntegral")
    public JsonResult<WelfareOrderGoodsPayDetailVo> getPaymentInfoForIntegral(Integer orderId) {
        return JsonResult.success(service.getPaymentInfoForIntegral(orderId,1));
    }
}
